<template>
    <div class="container">
        <van-swipe :show-indicators="false" style="height: 100%; width: 100%;" vertical>
            <van-swipe-item v-for="video in videos" :key="video.id">
                <video :src="video.url" autoplay></video>
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script>
import Vue from 'vue';
import { Swipe, SwipeItem } from 'vant';
import { getVideo } from '@/request/request';

Vue.use(Swipe);
Vue.use(SwipeItem);
export default {
    created() {
        getVideo().then(data => this.videos = data);
    },
    data() {
        return {
            videos: []
        }
    },
    methods: {

    }
}
</script>

<style lang="scss" scoped>

.van-swipe {
    >div {
        // height: 100% !important;

        .van-swipe-item {
            width: 100%;
            // height: 100% !important;

            video {
                width: 100%;
                // height: 100%;
            }
        }
    }
}</style>
